package com.hypo.ribbonserver.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: haibo.tang2
 * @Date: 2021/8/16
 * @Description:
 **/
@Configuration
public class LoadbalancerConfig {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    @Bean
    @LoadBalanced
    public  RestTemplate restTemplate2(){
        return new RestTemplate();
    }
}
